package com.wise.service.cms.content.useroplog;

import com.wise.entities.content.UserOpLog;
import com.wise.framework.dao.SqlSelect;
import com.wise.framework.daomodel.DaoPageList;
import com.wise.framework.restful.PageResultList;
import com.wise.summer.v1.cms.content.useroplog.PageListUserOpLog;
import org.springframework.stereotype.Service;
import org.summerframework.model.SummerService;
import org.summerframework.model.SummerServiceBean;

@Service
@SummerService
public class PageListUserOpLogService implements SummerServiceBean<PageListUserOpLog> {

    @Override
    public void sum(PageListUserOpLog summer) {
        SqlSelect sql = SqlSelect.selec("*")
                .fromClassName(UserOpLog.class)
                .order_by("id desc");

        PageResultList<UserOpLog> productList = DaoPageList.s(UserOpLog.class, sql, summer.getStart(), summer.getLimit());

        summer.setSummerResult(productList);
    }


}
